/**
                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-;// ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ;//: | |
     \  \ `-.   \_ __\ /__ _/   .-;///  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
                                     佛祖保佑       永无BUG
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
	Copyright (c) 2016,  email:14902300@qq.com All Rights Reserved. 
*/
package com.fclassroom.logger.entity;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fclassroom.awaker.utils.StringUtil;
import com.jason.framework.util.JsonUtil;

/**
 * @author jason
 * @date 2016 2016年7月27日 下午4:43:19
 */
public class LogRExamRead implements Serializable {
	private Long id;  //BIGINT(20) NOT NULL AUTO_INCREMENT,
	private Long examId;  //BIGINT(20) NOT NULL,
	private Long schoolId;  //BIGINT(20) NOT NULL,
	private Long gradeId;  //BIGINT(20) NULL DEFAULT NULL,
	private Long userId;  //BIGINT(20) NOT NULL COMMENT '操作人ID',
	private String userName;  //VARCHAR(255) NULL DEFAULT NULL COMMENT '操作人姓名',
	private String userIp;  //VARCHAR(255) NULL DEFAULT NULL COMMENT '操作人IP',
	private String userAgent;  //VARCHAR(255) NULL DEFAULT NULL COMMENT '操作人使用环境，浏览器|操作系统等',
	private Date createTime;  //DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '日志记录时间',
	private Date readTime;  //DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '客户端记录的阅卷时间',
	private Date uploadTime;  //DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '成绩上传时间',
	private Integer readWay;  //TINYINT(4) NULL DEFAULT NULL COMMENT '1，即扫即阅；2，先扫后阅；3，图像模式',
	private Integer groupBy;  //TINYINT(4) NULL DEFAULT NULL COMMENT ' 按班读/按考场读',
	private String groupIds;  //VARCHAR(255) NULL DEFAULT NULL COMMENT ' 按班读/按考场读的ID集合',
	private Integer stuTotalCount;  //INT(11) NULL DEFAULT NULL COMMENT '读取数量',
	private Integer stuOverCount;  //INT(11) NULL DEFAULT NULL COMMENT '已经扫了多少人',
	private Integer stuMissCount;  //INT(11) NULL DEFAULT NULL COMMENT '缺考人数',
	private Integer stuFixCount;  //INT(11) NULL DEFAULT NULL COMMENT '修正人数(手动匹配)',
	private Integer imgTotalCount;  //INT(11) NULL DEFAULT '0' COMMENT '图片总张数',
	private Integer imgErrorCount;  //INT(11) NULL DEFAULT '0' COMMENT '错误张数',
	private Integer imgFixCount;  //INT(11) NULL DEFAULT '0' COMMENT '修正图片张数'
	
	private List<LogRExamReadDetail> examReadDetails = new ArrayList<LogRExamReadDetail>();
	private String startTime;
	private String endTime;
	/**
	 * @author jason
	 * @date 2016 2016年7月28日 上午10:02:19
	 * @param operaterLog
	 */
	public LogRExamRead(OperaterLog operaterLog) {
		this.userId = operaterLog.getUserId();
		this.userName = operaterLog.getUserName();
		this.userIp = operaterLog.getUserIp();
		String content=operaterLog.getContent();
		if(StringUtil.isNotEmpty(content)){
			LogRExamRead examRead=JsonUtil.jsonToObject(content, LogRExamRead.class);
			if(examRead!=null){
				this.userAgent = examRead.getUserAgent();
				this.examId = examRead.getExamId();
				this.schoolId = examRead.getSchoolId();
				this.gradeId = examRead.getGradeId();
				this.readTime = examRead.getReadTime();
				this.uploadTime = examRead.getUploadTime();
				this.readWay = examRead.getReadWay();
				this.groupBy = examRead.getGroupBy();
				this.groupIds = examRead.getGroupIds();
				this.stuTotalCount = examRead.getStuTotalCount();
				this.stuOverCount = examRead.getStuOverCount();
				this.stuMissCount = examRead.getStuMissCount();
				this.stuFixCount = examRead.getStuFixCount();
				this.imgTotalCount = examRead.getImgTotalCount();
				this.imgErrorCount = examRead.getImgErrorCount();
				this.imgFixCount = examRead.getImgFixCount();
				this.examReadDetails=examRead.getExamReadDetails();
			}
		}
	}
	
	public LogRExamRead() {
		super();
	}


	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * @return the examId
	 */
	public Long getExamId() {
		return examId;
	}
	/**
	 * @param examId the examId to set
	 */
	public void setExamId(Long examId) {
		this.examId = examId;
	}
	/**
	 * @return the schoolId
	 */
	public Long getSchoolId() {
		return schoolId;
	}
	/**
	 * @param schoolId the schoolId to set
	 */
	public void setSchoolId(Long schoolId) {
		this.schoolId = schoolId;
	}
	/**
	 * @return the gradeId
	 */
	public Long getGradeId() {
		return gradeId;
	}
	/**
	 * @param gradeId the gradeId to set
	 */
	public void setGradeId(Long gradeId) {
		this.gradeId = gradeId;
	}
	/**
	 * @return the userId
	 */
	public Long getUserId() {
		return userId;
	}
	/**
	 * @param userId the userId to set
	 */
	public void setUserId(Long userId) {
		this.userId = userId;
	}
	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}
	/**
	 * @param userName the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}
	/**
	 * @return the userIp
	 */
	public String getUserIp() {
		return userIp;
	}
	/**
	 * @param userIp the userIp to set
	 */
	public void setUserIp(String userIp) {
		this.userIp = userIp;
	}
	/**
	 * @return the userAgent
	 */
	public String getUserAgent() {
		return userAgent;
	}
	/**
	 * @param userAgent the userAgent to set
	 */
	public void setUserAgent(String userAgent) {
		this.userAgent = userAgent;
	}
	/**
	 * @return the createTime
	 */
	public Date getCreateTime() {
		return createTime;
	}
	/**
	 * @param createTime the createTime to set
	 */
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	/**
	 * @return the readTime
	 */
	public Date getReadTime() {
		return readTime;
	}
	/**
	 * @param readTime the readTime to set
	 */
	public void setReadTime(Date readTime) {
		this.readTime = readTime;
	}
	/**
	 * @return the uploadTime
	 */
	public Date getUploadTime() {
		return uploadTime;
	}
	/**
	 * @param uploadTime the uploadTime to set
	 */
	public void setUploadTime(Date uploadTime) {
		this.uploadTime = uploadTime;
	}
	/**
	 * @return the readWay
	 */
	public Integer getReadWay() {
		return readWay;
	}
	/**
	 * @param readWay the readWay to set
	 */
	public void setReadWay(Integer readWay) {
		this.readWay = readWay;
	}
	/**
	 * @return the groupBy
	 */
	public Integer getGroupBy() {
		return groupBy;
	}
	/**
	 * @param groupBy the groupBy to set
	 */
	public void setGroupBy(Integer groupBy) {
		this.groupBy = groupBy;
	}
	/**
	 * @return the groupIds
	 */
	public String getGroupIds() {
		return groupIds;
	}
	/**
	 * @param groupIds the groupIds to set
	 */
	public void setGroupIds(String groupIds) {
		this.groupIds = groupIds;
	}
	/**
	 * @return the stuTotalCount
	 */
	public Integer getStuTotalCount() {
		return stuTotalCount;
	}
	/**
	 * @param stuTotalCount the stuTotalCount to set
	 */
	public void setStuTotalCount(Integer stuTotalCount) {
		this.stuTotalCount = stuTotalCount;
	}
	/**
	 * @return the stuOverCount
	 */
	public Integer getStuOverCount() {
		return stuOverCount;
	}
	/**
	 * @param stuOverCount the stuOverCount to set
	 */
	public void setStuOverCount(Integer stuOverCount) {
		this.stuOverCount = stuOverCount;
	}
	/**
	 * @return the stuMissCount
	 */
	public Integer getStuMissCount() {
		return stuMissCount;
	}
	/**
	 * @param stuMissCount the stuMissCount to set
	 */
	public void setStuMissCount(Integer stuMissCount) {
		this.stuMissCount = stuMissCount;
	}
	/**
	 * @return the stuFixCount
	 */
	public Integer getStuFixCount() {
		return stuFixCount;
	}
	/**
	 * @param stuFixCount the stuFixCount to set
	 */
	public void setStuFixCount(Integer stuFixCount) {
		this.stuFixCount = stuFixCount;
	}
	/**
	 * @return the imgTotalCount
	 */
	public Integer getImgTotalCount() {
		return imgTotalCount;
	}
	/**
	 * @param imgTotalCount the imgTotalCount to set
	 */
	public void setImgTotalCount(Integer imgTotalCount) {
		this.imgTotalCount = imgTotalCount;
	}
	/**
	 * @return the imgErrorCount
	 */
	public Integer getImgErrorCount() {
		return imgErrorCount;
	}
	/**
	 * @param imgErrorCount the imgErrorCount to set
	 */
	public void setImgErrorCount(Integer imgErrorCount) {
		this.imgErrorCount = imgErrorCount;
	}
	/**
	 * @return the imgFixCount
	 */
	public Integer getImgFixCount() {
		return imgFixCount;
	}
	/**
	 * @param imgFixCount the imgFixCount to set
	 */
	public void setImgFixCount(Integer imgFixCount) {
		this.imgFixCount = imgFixCount;
	}

	public List<LogRExamReadDetail> getExamReadDetails() {
		return examReadDetails;
	}

	public void setExamReadDetails(List<LogRExamReadDetail> examReadDetails) {
		this.examReadDetails = examReadDetails;
	}

	public String getStartTime() {
		return startTime;
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public String getEndTime() {
		return endTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}
	
	
}
